package demo2;

import java.util.HashMap;
import java.util.Map;
import java.util.Set;

@SuppressWarnings({"all"})
public class test {
    public static void main(String[] args) {
        Map map = new HashMap();
        map.put("no1","hsp");
        map.put("no2","zzy");
        map.put(new car(),new person());

        Set set = map.entrySet();
        System.out.println(set.getClass());
        for (Object o1 : set) {
            //这个是进行向下转型
            Map.Entry entry = (Map.Entry) o1;
            System.out.println(entry.getKey()+"-----"+entry.getValue());
        }
    }
}

class car{

}
class person{

}